﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Meraz.Core.Repositories;
using Ninject;
using System.IO;

namespace Meraz.Core.Managers
{
    public class FileManager
    {
        [Inject]
        public ITwitterFileRepository TwitterFileRepository { get; set; }
        public void Save(string fileName, Stream stream, StudyKeyType studyKey)
        {
            switch (studyKey)
            {
                case StudyKeyType.Twitter: TwitterFileRepository.Add(fileName, stream);
                    break;
                default:
                    throw new NotImplementedException();
            }
        }

        public List<FileInfo> GetFiles(StudyKeyType studyKey)
        {
            switch (studyKey)
            {
                case StudyKeyType.Twitter:
                    return TwitterFileRepository.All();
                default:
                    throw new NotImplementedException();
            }
        }
    }
}
